Skip to content

Conversation

khtee
Copy link

@khtee khtee commented Jan 22, 2024

Image is a required value when creating a deployment. Adding this check into schema to catch the error when there is no image field.

Following is the error received when performing kubectl apply.

Error in creating Deployment YAML on kubernetes 
spec.template.spec.containers[1].image: Required value
spec.template.spec.containers[2].image: Required value

@yannh
Copy link
Owner

yannh commented Jan 23, 2024

Hi @khtee , thanks for the contribution! All these schemas are automatically generated using this script https://github.com/yannh/openapi2jsonschema here: https://github.com/yannh/kubernetes-json-schema/blob/master/build.sh

If you found an issue, it's likely a bug in the openapi2jsonschema script... any chance you could have a look? I would not merge "manual" changes to the generated schemas 😞 but happy to regenerate them if we can fix the script!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants